package 蓝桥.EXCEL地址;

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class Main {
    public static void main(String[] args) {
//        System.out.println((char)( 'A'+25));
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        long n = scan.nextLong();
//        n = n-1;
        StringBuilder sb = new StringBuilder();
        while(n>0){
          int m =(int) (n%26);
          n/=26;
          if(m!=0){
            sb.insert(0,(char) ('A'+ m -1));
            }else{
              sb.insert(0,'Z');
              n--;
            }
        }
        System.out.println(sb.toString());
        scan.close();
    }
}